<me:UIWVWB25 x:Class="WPFExcelReport.TPRWB25"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM" 
                    xmlns:BW="clr-namespace:WPFExcelReport;assembly=TWBBEW" 
                    xmlns:WB="clr-namespace:WPFExcelReport;assembly=TWBDAT" 
                    xmlns:DR="clr-namespace:WPFExcelReport;assembly=TDRAUFTR" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                  FTAUTOSUM="True"
                   SKEY1="WBBART" 
                     KEY1="WBBISTKLG"      
                   x:Name="TV" 
                    Loaded="Window_Loaded"
     >
    <me:UIWVWB25.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:KM2YD x:Key="KM2YD"/>
        <ucd:M2YD x:Key="M2YD"/>
    </me:UIWVWB25.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel>
            <Button Grid.Column="1" Height="20"  Width="24" Margin="20,0,0,0"  Click="DeleteCommand">
                <Button.Background>
                    <ImageBrush ImageSource="/ImagePackage;component/Images/Remove.png" />
                </Button.Background>
            </Button>
            <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <DR:TDRAUFTR  Grid.Column="0" Name="cDR" DocType="UBTAB55WB" Visibility="Collapsed" PrintType="OpenExcel" />
                <Button  Grid.Column="1"   Click="PrintCommand" Height="20" Margin="5,0,0,0"
                         Width="Auto" Content="{Binding Source={Localization:Translate Word=打印标签}}"  />
            </Grid>
        </WrapPanel>
        <DataGrid  Grid.Row="1"  Grid.Column="0"
                   VerticalAlignment="Top"   
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   IsReadOnly="True"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"     
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                   x:Name="dlgMaster"  
                   RowDetailsVisibilityMode="Visible"  Margin="0,0,0,0"
                    >
            <DataGrid.Columns> 
                <DataGridTextColumn   Header="{Binding Source={Localization:Translate Word=布卷号}}" Binding="{Binding WBBSTKNR,Converter={StaticResource pnum}}"/>
                <DataGridTextColumn   Header="{Binding Source={Localization:Translate Word=边字}}" Binding="{Binding WBBVAR}"/>
                <DataGridTextColumn  Header="{Binding Source={Localization:Translate Word=数量(米)}}" Binding="{Binding WBBISTKLG,Converter={StaticResource ResourceKey=d1000}}"/>
                <DataGridTextColumn  Header="{Binding Source={Localization:Translate Word=数量(码)}}" Binding="{Binding WBBISTKLG,Converter={StaticResource ResourceKey=KM2YD}}"/>
                <DataGridTextColumn  IsReadOnly="True"  Binding="{Binding Path=WBBLO}"  Width="Auto"/>
                <DataGridTextColumn  IsReadOnly="True"  Binding="{Binding Path=WBBLB}" Header="{Binding Source={Localization:Translate Word=库位}}"  Width="Auto"/>
                <DataGridTextColumn  IsReadOnly="True"  Binding="{Binding Path=WBBLP}"  Width="Auto"/>
                <DataGridTextColumn  IsReadOnly="True"  Binding="{Binding Path=WBBAUFKRS}"  Width="Auto"/>
                <DataGridTextColumn  IsReadOnly="True"  Binding="{Binding Path=WBBAUFLFD,Converter={StaticResource pnum}}" Header="{Binding Source={Localization:Translate Word=留位至}}"  Width="Auto"/>
                <DataGridTextColumn  IsReadOnly="True"  Binding="{Binding Path=WBBAUFPOS,Converter={StaticResource pnum}}"   Width="Auto" />                
                <DataGridTextColumn Binding="{Binding Path=WBBBEM,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=备注}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
        <ex:TPage  Grid.Row="2" Visibility="{Binding IsPage,Converter={StaticResource bv}}"/>
        <WrapPanel Grid.Row="3">
            <ex:TSUMWB/>
        </WrapPanel>
    </Grid>
</me:UIWVWB25>
